package list_;

import java.util.ArrayList;
import java.util.List;

/**
 * @author wly
 * @version V1.0.0
 * @date 2022/12/30 21:17
 */
public class ListMethod01 {
    public static void main(String[] args) {
        List list = new ArrayList();
        list.add("张三丰");
        list.add("贾宝玉");
        list.add(1, "wly");
        list.set(0, "marry");
        System.out.println(list);

        List list1 = list.subList(0, 2);
        System.out.println(list1);
    }
}
